<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 基本表单</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="shortcut icon" href="../favicon.ico">
    <link href="/Public/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link rel="stylesheet" href="/Public/css/ace.min.css"/>
    <link href="/Public/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/css/animate.css" rel="stylesheet">
    <link href="/Public/css/style.css?v=4.1.0" rel="stylesheet">
    <style type="text/css">
        th {
            text-align: center;
        }
    </style>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>逾期管理-
                        <small>逾期列表</small>
                    </h5>
                    <div class="ibox-tools">
                        <form method="get" action="<{$SRVER_NAME}>/admin.php/Overdue/OverdueList" class="pull-right mail-search">
                            <div class="input-group">
                                <input type="hidden" value="<{$type}>" name="type">
                                <input type="hidden" value="<{$rid}>" name="rid">
                                <input type="text" class="form-control input-sm" name="key" placeholder="搜索用户名/手机号"
                                       value="<{$key}>">
                                <div class="input-group-btn">
                                    <button type="submit" class="btn btn-sm btn-primary">
                                        搜索
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="ibox-content" id="copy_div" oncopy="copyfunc()">

                    <table class="table table-striped table-bordered table-hover" id="sample-table">
                        <if condition="($type eq 2) OR ($type eq 3) ">
                            <tr>
                                <th>用户名</th>
                                <th>手机号</th>
                                <!-- <th>地址</th>-->
                                <th>还款订单</th>
                                <th>还款金额</th>
                                <th>应还款时间</th>
                                <th>逾期天数</th>
                                <th>逾期罚金</th>
                                <th>逾期还款时间</th>
                                <th>还款状态</th>
                                <if condition="$type eq 2 ">
                                    <th>操作</th>
                                </if>
                            </tr>
                            <volist name="data" id="vo">

                                <tr>
                                    <td><{$vo.truename}></td>
                                    <td><{$vo.mobile}></td>
                                    <!-- <td><{$vo.address}></td>-->
                                    <td><{$vo.repayment_no}></td>
                                    <td><{$vo.repayment_money}></td>
                                    <td><{$vo.should_time}></td>
                                    <td><{$vo.overdue_day}></td>
                                    <td><{$vo.overdue_money}></td>
                                    <td><{$vo.overdue_time}></td>
                                    <td><{$vo.status}></td>
                                    <if condition="$type eq 2 ">
                                        <td>
                                            <volist name="roles" id="vr">
                                                <if condition="$vr.name eq '备注'">
                                                    <a href="javascript:;" class="btn btn-success btn-rounded"
                                                       onclick="show('<{$vo.id}>')">备注</a>
                                                </if>

                                            </volist>
                                        </td>
                                    </if>
                                </tr>
                            </volist>
                            <else/>
                            <tr>
                                <th style="width:100px">用户名</th>
                                <th style="width:80px">性别</th>
                                <th style="width:100px">手机号</th>
                                <!--<th>地址</th>-->
                                <th style="width:100px">还款订单</th>
                                <th style="width:100px">还款金额</th>
                                <th style="width:100px">应还款时间</th>
                                <th style="width:100px">逾期天数</th>
                                <th style="width:100px">逾期罚金</th>
                                <th style="width:100px">逾期还款时间</th>
                                <th style="width:100px">还款状态</th>
                                <th id="action" width="250px">操作</th>
                            </tr>
                            <volist name="data" id="vo">

                                <tr id="tr_<{$vo.id}>">
                                    <td><{$vo.truename}></td>
                                    <td><{$vo.sex}></td>
                                    <td><{$vo.mobile}></td>
                                    <!--<td><{$vo.address}></td>-->
                                    <td><{$vo.repayment_no}></td>
                                    <td><{$vo.repayment_money}></td>
                                    <td><{$vo.should_time}></td>
                                    <td><{$vo.overdue_day}></td>
                                    <td><{$vo.overdue_money}></td>
                                    <td><{$vo.overdue_time}></td>
                                    <td><{$vo.status}></td>

                                    <td id="action_2">
                                        <volist name="roles" id="vr">
                                            <if condition="$vr['name'] eq '用户详情'">
                                                <a href="<{$SRVER_NAME}>/admin.php/UserInfo/user_list_details?vid=<{$vo.vid}>&key=<{$key}>&user_type=2&page1=<{$page}>&rid=<{$rid}>&utype=<{$type}>"
                                                   class="btn btn-primary btn-rounded">查看详情</a>
                                            </if>
                                            <if condition="$vr.name eq '转交'">
                                                <a href="javascript:;" class="btn btn-info btn-rounded"
                                                   onclick="zj('<{$vo.id}>')">转交</a>
                                            </if>
                                            <if condition="$vr.name eq '备注'">
                                                <a href="javascript:;" class="btn btn-success btn-rounded"
                                                   onclick="show('<{$vo.id}>')">备注</a>
                                            </if>
                                        </volist>
                                    </td>
                                </tr>
                            </volist>
                        </if>
                    </table>
                    <div class="dataTables_paginate paging_simple_numbers">
                        <ul class="pagination">
                            <if condition="$tol gt 10">
                                <{$fpage}>
                            </if>

                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/Public/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Public/js/content.js?v=1.0.0"></script>
<script src="/Public/admin/js/layer/layer.js"></script>
<script src="/Public/admin/js/layui/layui.js"></script>
<script>

    function copyfunc() {
        var url = "<{$SRVER_NAME}>/admin.php/AntiUser/copy_record";
        var content = document.getElementById("copy_div").innerHTML;
        var type = "<{$type}>";
        var c_type = 0;
        if (type == 2) {
            c_type = 3;
        } else if (type == 1) {
            c_type = 4;
        } else if (type == 3) {
            c_type = 5;
        }

        $.post(url, {content: content, type: c_type}, function (data) {
            if (data.code == "1001") {

            }
            else {

            }

        });
    }

    function hiide() {
        var type = "<{$type}>";
        var action = document.getElementById("action");
        var action2 = document.getElementById("action_2");

        if (type == 2 || type == 3) {
            action.style.display = "none";
            action2.style.display = "none";
        }
    }
    function show(id) { //弹框显示
        layer.open({
            title: '预约借款状态',
            type: 2,
            area: ['1200px', '650px'],
            maxmin: true,
            offset: '100px',
            content: '<{$SRVER_NAME}>/admin.php/Overdue/overdue_mark.html?id=' + id,
            success: function (layero) {
                layero.find('.layui-layer-min').remove();
            }
        });
    }
    function zj(id) { //弹框显示
        layer.open({
            title: '转交申请',
            type: 2,
            area: ['600px', '350px'],
            maxmin: true,
            offset: '100px',
            content: '<{$SRVER_NAME}>/admin.php/Overdue/Overdue_apply?id=' + id,
            success: function (layero) {
                layero.find('.layui-layer-min').remove();
            }
        });
    }

</script>
</body>
</html>
